<?php
session_start();
$ruta_raiz = "..";
require("../include/xajax/xajax.inc.php"); // LLAMADO DE LIBRERIA XAJAX
$xajax = new xajax(); // CREACION DEL OBJETO XAJAX
/* FUNCIONES XAJAX */
$xajax->registerExternalFunction("cargar_combo_hora", "$ruta_raiz/include/combos_xajax.php");
$xajax->registerExternalFunction("showReport", "xajax_auditoria_especifica.php");
//$xajax->debugOn();
$xajax->processRequests();

include_once "$ruta_raiz/include/db/ConnectionHandler.php";
include_once "$ruta_raiz/class_control/auditoria.php";
include_once "$ruta_raiz/class_control/usuario.php";
$db = new ConnectionHandler("$ruta_raiz");
error_reporting(7);
$usua_doc=$_SESSION['usua_doc'];
$db->conn->SetFetchMode(ADODB_FETCH_ASSOC);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<?php $xajax->printJavascript("$ruta_raiz/include/xajax/"); ?>
<link rel="stylesheet" href="<?php echo $ruta_raiz ?>/estilos/orfeo.css">


<div id="spiffycalendar" class="text"></div>
<link rel="stylesheet" type="text/css"
	href="<? echo $ruta_raiz?>/js/spiffyCal/spiffyCal_v2_1.css">
<script language="JavaScript"
	src="<?echo $ruta_raiz?>/js/spiffyCal/spiffyCal_v2_1.js"></script>

<meta http-equiv="Content-Type" content="text/html; charset=encoding">
<title>ORFEO :: Auditoria Espec&iacute;fica.</title>
</head>
<body style="font-size: 10px; font-famly: Arial">
<form id="form1" name="form1">
<table width='600px' align="center">
	<tr>
		<td align="center" colspan="4" class="titulos3"><B>Auditoria
		espec&iacuteca</B></td>
	</tr>
	<tr>
		<td align="center" colspan="4" class="listado2">
		<center><B>Seleccione un rango de tiempo.</B></center>
		</td>
	</tr>
	<tr>
		<td align="left" class="titulos2"><b>Fecha</b></td>
		<td align="center" class="listado2">
		<div id="fec_ini"></div>
		<script language="javascript">						
						var dateAvailable = new ctlSpiffyCalendarBox("dateAvailable", "form1","fec_ini","btnDate1","<? echo date('Y-m-d');?>",scBTNMODE_CUSTOMBLUE);						
						dateAvailable.writeControl();
						dateAvailable.dateFormat="yyyy-MM-dd";						
				</script></td>
		<td align="center" class="listado2">hasta</td>
		<td align="center" class="listado2">
		<div id="fec_fin"></div>
		<script language="javascript">						
						var dateAvailable2 = new ctlSpiffyCalendarBox("dateAvailable2", "form1","fec_fin","btnDate2","<? echo date('Y-m-d');?>",scBTNMODE_CUSTOMBLUE);	
						dateAvailable2.dateFormat="yyyy-MM-dd";
						dateAvailable2.writeControl();						
				</script></td>
	</tr>
	<tr>
		<td align="left" class="titulos2"><b>Hora</b></td>
		<td align="center" class="listado2">
		<div id="hora_ini"></div>
		</td>
		<td align="center" class="listado2">hasta</td>
		<td align="center" class="listado2">
		<div id="hora_fin"></div>
		</td>
	</tr>
	<tr>
		<td align="left" class="titulos2"><b>CRITERIO</b></td>
		<td align="center" class="listado2" colspan="3"><input type="text"
			id="num_rad" name="num_rad" class="tex_area"></td>
	</tr>
	<tr>
		<td align="left" class="listado2" colspan="4">
		<center><input type="button" class="botones" value="Buscar"
			onclick="xajax_showReport('..', xajax.getFormValues('form1'));"></center>
		</td>
	</tr>
</table>
<br>
<table width="800px" align="center">
	<tr>
		<td>
		<div id="divReport"></div>
		</td>
	</tr>
</table>
</form>
</body>
</html>
<script>	
	xajax_cargar_combo_hora('hora_ini', "08:00:00");
	xajax_cargar_combo_hora('hora_fin', "18:00:00");
	xajax_setUsuarios("..", "-1", "USUARIO");
	xajax_setDependencias("..", "-1", "DEPENDENCIA");
</script>
